{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "editable": false,
    "id": "-r-SJUrp6b_t"
   },
   "source": [
    "## Setting up"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 注意⚠️\n",
    "如果huggingface 无法连接，deepseek-r1-llama-8b模型和数据集无法下载。因此为了方便大家，提供一个网盘下载地址，请到该地址，即可下载模型和相应的训练数据集：\n",
    "> 模型下载地址：https://pan.quark.cn/s/d45a88061e3d\n",
    "> 训练数据集下载地址：https://pan.quark.cn/s/fea6a395deff"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "_cell_guid": "b1076dfc-b9ad-4769-8c92-a6c4dae69d19",
    "_uuid": "8f2839f25d086af736a60e9eeb907d3b93b6e0e5",
    "editable": false,
    "id": "bmDhM2646b_v",
    "papermill": {
     "duration": 164.985343,
     "end_time": "2024-09-25T13:11:54.926296",
     "exception": false,
     "start_time": "2024-09-25T13:09:09.940953",
     "status": "completed"
    },
    "tags": []
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...\n",
      "To disable this warning, you can either:\n",
      "\t- Avoid using `tokenizers` before the fork if possible\n",
      "\t- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)\n",
      "huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...\n",
      "To disable this warning, you can either:\n",
      "\t- Avoid using `tokenizers` before the fork if possible\n",
      "\t- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)\n"
     ]
    }
   ],
   "source": [
    "%%capture\n",
    "!pip install unsloth\n",
    "# Also get the latest nightly Unsloth!\n",
    "!pip install --force-reinstall --no-cache-dir --no-deps git+https://github.com/unslothai/unsloth.git"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "editable": false,
    "id": "G1UpWpAQ6b_w",
    "outputId": "6cf7bf5c-9c83-4d8f-bfa5-ea3c3c45f492",
    "papermill": {
     "duration": 31.301473,
     "end_time": "2024-09-25T13:12:26.233487",
     "exception": false,
     "start_time": "2024-09-25T13:11:54.932014",
     "status": "completed"
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "from unsloth import FastLanguageModel\n",
    "import torch\n",
    "max_seq_length = 2048\n",
    "dtype = None\n",
    "load_in_4bit = True"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "id": "QMIlEq9dGDG0"
   },
   "source": [
    "可视化训练过程，将数据报送到wandb中"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...\n",
      "To disable this warning, you can either:\n",
      "\t- Avoid using `tokenizers` before the fork if possible\n",
      "\t- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Looking in indexes: https://mirrors.aliyun.com/pypi/simple/\n",
      "Requirement already satisfied: wandb in /home/user/anaconda3/lib/python3.12/site-packages (0.19.6)\n",
      "Requirement already satisfied: click!=8.0.0,>=7.1 in /home/user/anaconda3/lib/python3.12/site-packages (from wandb) (8.1.7)\n",
      "Requirement already satisfied: docker-pycreds>=0.4.0 in /home/user/anaconda3/lib/python3.12/site-packages (from wandb) (0.4.0)\n",
      "Requirement already satisfied: gitpython!=3.1.29,>=1.0.0 in /home/user/anaconda3/lib/python3.12/site-packages (from wandb) (3.1.43)\n",
      "Requirement already satisfied: platformdirs in /home/user/anaconda3/lib/python3.12/site-packages (from wandb) (3.10.0)\n",
      "Requirement already satisfied: protobuf!=4.21.0,!=5.28.0,<6,>=3.19.0 in /home/user/anaconda3/lib/python3.12/site-packages (from wandb) (3.20.3)\n",
      "Requirement already satisfied: psutil>=5.0.0 in /home/user/anaconda3/lib/python3.12/site-packages (from wandb) (5.9.0)\n",
      "Requirement already satisfied: pydantic<3,>=2.6 in /home/user/anaconda3/lib/python3.12/site-packages (from wandb) (2.8.2)\n",
      "Requirement already satisfied: pyyaml in /home/user/anaconda3/lib/python3.12/site-packages (from wandb) (6.0.1)\n",
      "Requirement already satisfied: requests<3,>=2.0.0 in /home/user/anaconda3/lib/python3.12/site-packages (from wandb) (2.32.3)\n",
      "Requirement already satisfied: sentry-sdk>=2.0.0 in /home/user/anaconda3/lib/python3.12/site-packages (from wandb) (2.21.0)\n",
      "Requirement already satisfied: setproctitle in /home/user/anaconda3/lib/python3.12/site-packages (from wandb) (1.3.4)\n",
      "Requirement already satisfied: setuptools in /home/user/anaconda3/lib/python3.12/site-packages (from wandb) (75.1.0)\n",
      "Requirement already satisfied: six>=1.4.0 in /home/user/anaconda3/lib/python3.12/site-packages (from docker-pycreds>=0.4.0->wandb) (1.16.0)\n",
      "Requirement already satisfied: gitdb<5,>=4.0.1 in /home/user/anaconda3/lib/python3.12/site-packages (from gitpython!=3.1.29,>=1.0.0->wandb) (4.0.7)\n",
      "Requirement already satisfied: annotated-types>=0.4.0 in /home/user/anaconda3/lib/python3.12/site-packages (from pydantic<3,>=2.6->wandb) (0.6.0)\n",
      "Requirement already satisfied: pydantic-core==2.20.1 in /home/user/anaconda3/lib/python3.12/site-packages (from pydantic<3,>=2.6->wandb) (2.20.1)\n",
      "Requirement already satisfied: typing-extensions>=4.6.1 in /home/user/anaconda3/lib/python3.12/site-packages (from pydantic<3,>=2.6->wandb) (4.11.0)\n",
      "Requirement already satisfied: charset-normalizer<4,>=2 in /home/user/anaconda3/lib/python3.12/site-packages (from requests<3,>=2.0.0->wandb) (3.3.2)\n",
      "Requirement already satisfied: idna<4,>=2.5 in /home/user/anaconda3/lib/python3.12/site-packages (from requests<3,>=2.0.0->wandb) (3.7)\n",
      "Requirement already satisfied: urllib3<3,>=1.21.1 in /home/user/anaconda3/lib/python3.12/site-packages (from requests<3,>=2.0.0->wandb) (2.2.3)\n",
      "Requirement already satisfied: certifi>=2017.4.17 in /home/user/anaconda3/lib/python3.12/site-packages (from requests<3,>=2.0.0->wandb) (2024.8.30)\n",
      "Requirement already satisfied: smmap<5,>=3.0.1 in /home/user/anaconda3/lib/python3.12/site-packages (from gitdb<5,>=4.0.1->gitpython!=3.1.29,>=1.0.0->wandb) (4.0.0)\n"
     ]
    }
   ],
   "source": [
    "!pip install wandb"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\u001b[34m\u001b[1mwandb\u001b[0m: \u001b[33mWARNING\u001b[0m Calling wandb.login() after wandb.init() has no effect.\n"
     ]
    }
   ],
   "source": [
    "## 这里不使用环境变量，直接填入wandb的token,如果没有token可以去官网下载一个\n",
    "import wandb\n",
    "\n",
    "wandb.login(key=\"822b638c1f465585a2a139ce45f36c4d0a6e0180\")\n",
    "run = wandb.init(\n",
    "    project='my fint-tune on deepseek r1 with medical data',\n",
    "    job_type=\"training\",\n",
    "    anonymous=\"allow\"\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "editable": false,
    "id": "x3C_JY6e6b_x"
   },
   "source": [
    "## Loading the model and tokenizer"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "==((====))==  Unsloth 2025.2.12: Fast Llama patching. Transformers: 4.48.3.\n",
      "   \\\\   /|    GPU: NVIDIA L20. Max memory: 44.422 GB. Platform: Linux.\n",
      "O^O/ \\_/ \\    Torch: 2.6.0+cu126. CUDA: 8.9. CUDA Toolkit: 12.6. Triton: 3.2.0\n",
      "\\        /    Bfloat16 = TRUE. FA [Xformers = None. FA2 = False]\n",
      " \"-____-\"     Free Apache license: http://github.com/unslothai/unsloth\n",
      "Unsloth: Fast downloading is enabled - ignore downloading bars which are red colored!\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "2a66c44df8b84a17adf3f5b4a4d9aaf3",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Loading checkpoint shards:   0%|          | 0/4 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "model, tokenizer = FastLanguageModel.from_pretrained(\n",
    "    model_name = \"/app/models/deepseek-r1:8b-unsloth\", # 这里改成你本地模型，以我的为例，我已经huggingface上的模型文件下载到本地。\n",
    "    max_seq_length = max_seq_length,\n",
    "    dtype = dtype,\n",
    "    load_in_4bit = load_in_4bit,\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "editable": false,
    "id": "DHTrWVzp6b_x"
   },
   "source": [
    "## Model inference before fine-tuning"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "editable": false,
    "id": "y36oW6mo6b_y",
    "papermill": {
     "duration": 0.014436,
     "end_time": "2024-09-25T13:13:09.483925",
     "exception": false,
     "start_time": "2024-09-25T13:13:09.469489",
     "status": "completed"
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "prompt_style = \"\"\"Below is an instruction that describes a task, paired with an input that provides further context.\n",
    "Write a response that appropriately completes the request.\n",
    "Before answering, think carefully about the question and create a step-by-step chain of thoughts to ensure a logical and accurate response.\n",
    "\n",
    "### Instruction:\n",
    "You are a medical expert with advanced knowledge in clinical reasoning, diagnostics, and treatment planning.\n",
    "Please answer the following medical question.\n",
    "\n",
    "### Question:\n",
    "{}\n",
    "\n",
    "### Response:\n",
    "<think>{}\"\"\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "editable": false,
    "id": "Nt7aM7Rn6b_y",
    "outputId": "1e36e085-5394-4e6b-850e-46a0d6d74ae8"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<｜begin▁of▁sentence｜>Below is an instruction that describes a task, paired with an input that provides further context.\n",
      "Write a response that appropriately completes the request.\n",
      "Before answering, think carefully about the question and create a step-by-step chain of thoughts to ensure a logical and accurate response.\n",
      "\n",
      "### Instruction:\n",
      "You are a medical expert with advanced knowledge in clinical reasoning, diagnostics, and treatment planning.\n",
      "Please answer the following medical question.\n",
      "\n",
      "### Question:\n",
      "A 61-year-old woman with a long history of involuntary urine loss during activities like coughing or sneezing but no leakage at night undergoes a gynecological exam and Q-tip test. Based on these findings, what would cystometry most likely reveal about her residual volume and detrusor contractions?\n",
      "\n",
      "### Response:\n",
      "<think>\n",
      "\n",
      "### Response:\n",
      "\n",
      "Cystometry, also known as the bladder diary method, assesses how much urine a person produces and how their bladder responds to storage. In this case, the findings from the gynecological exam and Q-tip test indicate that during activities like coughing or sneezing, there is involuntary urine loss. However, there is no leakage at night. \n",
      "\n",
      "When performing cystometry, the results typically reveal information about residual volume and detrusor contractions. The residual volume is the amount of urine that remains in the bladder after storage. If the patient has a history of involuntarily losing urine during activities, this may indicate an overactive bladder. \n",
      "\n",
      "Detrusor contractions refer to the involuntary muscle contractions that push urine out. If there is no leakage at night, this suggests that the bladder's capacity to store urine is adequate. However, the fact that there is urine loss during activities like coughing may point to a need for further evaluation, such as bladder diary or pelvic floor muscle assessment, to identify potential triggers or underlying conditions like urgency, stress incontinence, or overactive bladder syndrome.\n",
      "\n",
      "In summary, cystometry would likely reveal information about the bladder's residual volume and the presence or absence of detrusor contractions that result in leakage during specific activities.<｜end▁of▁sentence｜>\n",
      "\n",
      "<think>\n",
      "\n",
      "\n"
     ]
    }
   ],
   "source": [
    "question = \"A 61-year-old woman with a long history of involuntary urine loss during activities like coughing or sneezing but no leakage at night undergoes a gynecological exam and Q-tip test. Based on these findings, what would cystometry most likely reveal about her residual volume and detrusor contractions?\"\n",
    "\n",
    "\n",
    "FastLanguageModel.for_inference(model)  # Unsloth has 2x faster inference!\n",
    "\n",
    "inputs = tokenizer([prompt_style.format(question, \"\")], return_tensors=\"pt\").to(\"cuda\")\n",
    "\n",
    "outputs = model.generate(\n",
    "    input_ids=inputs.input_ids,\n",
    "    attention_mask=inputs.attention_mask,\n",
    "    max_new_tokens=1200,\n",
    "    use_cache=True,\n",
    ")\n",
    "response = tokenizer.batch_decode(outputs)\n",
    "print(response[0])\n",
    "print(response[0].split(\"### Response:\")[1])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "editable": false,
    "id": "PLzmU3OH6b_y",
    "outputId": "57e968e5-f7d8-4140-8fa1-05cf5409f219",
    "papermill": {
     "duration": 5.943269,
     "end_time": "2024-09-25T13:13:09.461941",
     "exception": false,
     "start_time": "2024-09-25T13:13:03.518672",
     "status": "completed"
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "FastLanguageModel.for_training(model)\n",
    "model = FastLanguageModel.get_peft_model(\n",
    "    model,\n",
    "    r=16,\n",
    "    target_modules=[\n",
    "        \"q_proj\",\n",
    "        \"k_proj\",\n",
    "        \"v_proj\",\n",
    "        \"o_proj\",\n",
    "        \"gate_proj\",\n",
    "        \"up_proj\",\n",
    "        \"down_proj\",\n",
    "    ],\n",
    "    lora_alpha=16,\n",
    "    lora_dropout=0,\n",
    "    bias=\"none\",\n",
    "    use_gradient_checkpointing=\"unsloth\",  # True or \"unsloth\" for very long context\n",
    "    random_state=3407,\n",
    "    use_rslora=False,\n",
    "    loftq_config=None,\n",
    ")\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "editable": false,
    "id": "x_trNlci6b_y"
   },
   "source": [
    "## Loading and processing the dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {
    "editable": false,
    "id": "CwCzOgAy6b_y"
   },
   "outputs": [],
   "source": [
    "train_prompt_style = \"\"\"Below is an instruction that describes a task, paired with an input that provides further context.\n",
    "Write a response that appropriately completes the request.\n",
    "Before answering, think carefully about the question and create a step-by-step chain of thoughts to ensure a logical and accurate response.\n",
    "\n",
    "### Instruction:\n",
    "You are a medical expert with advanced knowledge in clinical reasoning, diagnostics, and treatment planning.\n",
    "Please answer the following medical question.\n",
    "\n",
    "### Question:\n",
    "{}\n",
    "\n",
    "### Response:\n",
    "<think>\n",
    "{}\n",
    "</think>\n",
    "{}\"\"\"\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "editable": false,
    "id": "Fo0OGx8w6b_z",
    "papermill": {
     "duration": 0.015203,
     "end_time": "2024-09-25T13:13:09.506291",
     "exception": false,
     "start_time": "2024-09-25T13:13:09.491088",
     "status": "completed"
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "EOS_TOKEN = tokenizer.eos_token  # Must add EOS_TOKEN\n",
    "\n",
    "\n",
    "def formatting_prompts_func(examples):\n",
    "    inputs = examples[\"Question\"]\n",
    "    cots = examples[\"Complex_CoT\"]\n",
    "    outputs = examples[\"Response\"]\n",
    "    texts = []\n",
    "    for input, cot, output in zip(inputs, cots, outputs):\n",
    "        text = train_prompt_style.format(input, cot, output) + EOS_TOKEN\n",
    "        texts.append(text)\n",
    "    return {\n",
    "        \"text\": texts,\n",
    "    }\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 143
    },
    "id": "kSCrcJxlAfoa",
    "outputId": "9d6ddebb-e390-4035-f3aa-977486080305"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\"Below is an instruction that describes a task, paired with an input that provides further context.\\nWrite a response that appropriately completes the request.\\nBefore answering, think carefully about the question and create a step-by-step chain of thoughts to ensure a logical and accurate response.\\n\\n### Instruction:\\nYou are a medical expert with advanced knowledge in clinical reasoning, diagnostics, and treatment planning.\\nPlease answer the following medical question.\\n\\n### Question:\\nA 61-year-old woman with a long history of involuntary urine loss during activities like coughing or sneezing but no leakage at night undergoes a gynecological exam and Q-tip test. Based on these findings, what would cystometry most likely reveal about her residual volume and detrusor contractions?\\n\\n### Response:\\n<think>\\nOkay, let's think about this step by step. There's a 61-year-old woman here who's been dealing with involuntary urine leakages whenever she's doing something that ups her abdominal pressure like coughing or sneezing. This sounds a lot like stress urinary incontinence to me. Now, it's interesting that she doesn't have any issues at night; she isn't experiencing leakage while sleeping. This likely means her bladder's ability to hold urine is fine when she isn't under physical stress. Hmm, that's a clue that we're dealing with something related to pressure rather than a bladder muscle problem. \\n\\nThe fact that she underwent a Q-tip test is intriguing too. This test is usually done to assess urethral mobility. In stress incontinence, a Q-tip might move significantly, showing urethral hypermobility. This kind of movement often means there's a weakness in the support structures that should help keep the urethra closed during increases in abdominal pressure. So, that's aligning well with stress incontinence.\\n\\nNow, let's think about what would happen during cystometry. Since stress incontinence isn't usually about sudden bladder contractions, I wouldn't expect to see involuntary detrusor contractions during this test. Her bladder isn't spasming or anything; it's more about the support structure failing under stress. Plus, she likely empties her bladder completely because stress incontinence doesn't typically involve incomplete emptying. So, her residual volume should be pretty normal. \\n\\nAll in all, it seems like if they do a cystometry on her, it will likely show a normal residual volume and no involuntary contractions. Yup, I think that makes sense given her symptoms and the typical presentations of stress urinary incontinence.\\n</think>\\nCystometry in this case of stress urinary incontinence would most likely reveal a normal post-void residual volume, as stress incontinence typically does not involve issues with bladder emptying. Additionally, since stress urinary incontinence is primarily related to physical exertion and not an overactive bladder, you would not expect to see any involuntary detrusor contractions during the test.<｜end▁of▁sentence｜>\""
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from datasets import load_dataset\n",
    "\n",
    "dataset = load_dataset(\"/app/datasets/medical-o1-reasoning-SFT\", \"en\",split = \"train[0:500]\") # 这里同样去huggingface上面下载数据集，然后放到本地\n",
    "dataset = dataset.map(formatting_prompts_func, batched = True,)\n",
    "dataset[\"text\"][0]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "editable": false,
    "id": "uFmyf5_w6b_z"
   },
   "source": [
    "## Setting up the model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 49,
     "referenced_widgets": [
      "fc3993b236b24cbcaecc4e7192fe3254",
      "af30810fd0544ba4b904de2ce3f02cec",
      "1969437f6b7b4f92bd71058a0bd5755a",
      "83c6aa3318cf4c8c8be3fd4f8e9ba387",
      "a60b14d5d28547cea890f3c17ab2ac8a",
      "d02a1ccb5a914647a3e9464031d38b79",
      "5927fd687bc4479eae3bf5985445cc9c",
      "e5fd64b00bbb4e299930464604518bac",
      "3e6b9d78fce94a20bf09b22b12a58119",
      "4fcaab874f16414391964cd95ebaa648",
      "8c773d3f8c3842a887c37cf14ffcabee"
     ]
    },
    "editable": false,
    "id": "9AuTcgxB6b_z",
    "outputId": "4ed3992b-e42f-4400-edc9-51660f4b0eb8",
    "papermill": {
     "duration": 1.901541,
     "end_time": "2024-09-25T13:13:25.296367",
     "exception": false,
     "start_time": "2024-09-25T13:13:23.394826",
     "status": "completed"
    },
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "893a2b25c1214c01a78a2691b91651ef",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Applying chat template to train dataset (num_proc=2):   0%|          | 0/500 [00:00<?, ? examples/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "6bfb34a16af047bd96b8586eecff6252",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Tokenizing train dataset (num_proc=2):   0%|          | 0/500 [00:00<?, ? examples/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "121c28f5145646a29cbe8c31262483df",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Tokenizing train dataset (num_proc=2):   0%|          | 0/500 [00:00<?, ? examples/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from trl import SFTTrainer\n",
    "from transformers import TrainingArguments\n",
    "from unsloth import is_bfloat16_supported\n",
    "\n",
    "trainer = SFTTrainer(\n",
    "    model=model,\n",
    "    tokenizer=tokenizer,\n",
    "    train_dataset=dataset,\n",
    "    dataset_text_field=\"text\",\n",
    "    max_seq_length=max_seq_length,\n",
    "    dataset_num_proc=2,\n",
    "    args=TrainingArguments(\n",
    "        per_device_train_batch_size=2,\n",
    "        gradient_accumulation_steps=4,\n",
    "        # Use num_train_epochs = 1, warmup_ratio for full training runs!\n",
    "        warmup_steps=5,\n",
    "        max_steps=60,\n",
    "        learning_rate=2e-4,\n",
    "        fp16=not is_bfloat16_supported(),\n",
    "        bf16=is_bfloat16_supported(),\n",
    "        logging_steps=10,\n",
    "        optim=\"adamw_8bit\",\n",
    "        weight_decay=0.01,\n",
    "        lr_scheduler_type=\"linear\",\n",
    "        seed=3407,\n",
    "        output_dir=\"outputs\",\n",
    "    ),\n",
    ")\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "editable": false,
    "id": "QosSqAta6b_z"
   },
   "source": [
    "## Model training"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 638
    },
    "editable": false,
    "id": "dGYprK9F6b_z",
    "outputId": "05b06c14-bfbb-4834-bf6f-80d66f91aff0",
    "papermill": {
     "duration": 1210.862521,
     "end_time": "2024-09-25T13:33:36.207919",
     "exception": false,
     "start_time": "2024-09-25T13:13:25.345398",
     "status": "completed"
    },
    "tags": []
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "==((====))==  Unsloth - 2x faster free finetuning | Num GPUs = 1\n",
      "   \\\\   /|    Num examples = 500 | Num Epochs = 1\n",
      "O^O/ \\_/ \\    Batch size per device = 2 | Gradient Accumulation steps = 4\n",
      "\\        /    Total batch size = 8 | Total steps = 60\n",
      " \"-____-\"     Number of trainable parameters = 41,943,040\n",
      "\u001b[34m\u001b[1mwandb\u001b[0m: \u001b[33mWARNING\u001b[0m The `run_name` is currently set to the same value as `TrainingArguments.output_dir`. If this was not intended, please specify a different run name by setting the `TrainingArguments.run_name` parameter.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "    <div>\n",
       "      \n",
       "      <progress value='60' max='60' style='width:300px; height:20px; vertical-align: middle;'></progress>\n",
       "      [60/60 03:43, Epoch 0/1]\n",
       "    </div>\n",
       "    <table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       " <tr style=\"text-align: left;\">\n",
       "      <th>Step</th>\n",
       "      <th>Training Loss</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>10</td>\n",
       "      <td>1.093100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>20</td>\n",
       "      <td>0.016300</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>30</td>\n",
       "      <td>0.024400</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>40</td>\n",
       "      <td>0.002200</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>50</td>\n",
       "      <td>0.001700</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>60</td>\n",
       "      <td>0.001400</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table><p>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "trainer_stats = trainer.train()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {
    "editable": false,
    "id": "3-wyYeic6b_z"
   },
   "outputs": [
    {
     "data": {
      "text/html": [],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<br>    <style><br>        .wandb-row {<br>            display: flex;<br>            flex-direction: row;<br>            flex-wrap: wrap;<br>            justify-content: flex-start;<br>            width: 100%;<br>        }<br>        .wandb-col {<br>            display: flex;<br>            flex-direction: column;<br>            flex-basis: 100%;<br>            flex: 1;<br>            padding: 10px;<br>        }<br>    </style><br><div class=\"wandb-row\"><div class=\"wandb-col\"><h3>Run history:</h3><br/><table class=\"wandb\"><tr><td>train/epoch</td><td>▁▂▄▅▇██</td></tr><tr><td>train/global_step</td><td>▁▂▄▅▇██</td></tr><tr><td>train/grad_norm</td><td>█▄▁▂▁▁</td></tr><tr><td>train/learning_rate</td><td>█▇▅▄▂▁</td></tr><tr><td>train/loss</td><td>█▁▁▁▁▁</td></tr></table><br/></div><div class=\"wandb-col\"><h3>Run summary:</h3><br/><table class=\"wandb\"><tr><td>total_flos</td><td>1.792773518721024e+16</td></tr><tr><td>train/epoch</td><td>0.96</td></tr><tr><td>train/global_step</td><td>60</td></tr><tr><td>train/grad_norm</td><td>0.00489</td></tr><tr><td>train/learning_rate</td><td>0</td></tr><tr><td>train/loss</td><td>0.0014</td></tr><tr><td>train_loss</td><td>0.18985</td></tr><tr><td>train_runtime</td><td>227.2874</td></tr><tr><td>train_samples_per_second</td><td>2.112</td></tr><tr><td>train_steps_per_second</td><td>0.264</td></tr></table><br/></div></div>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       " View run <strong style=\"color:#cdcd00\">resilient-bush-4</strong> at: <a href='https://wandb.ai/neuqkyn-rhzz/my%20fint-tune%20on%20deepseek%20r1%20with%20medical%20data/runs/kpp3eiow?apiKey=822b638c1f465585a2a139ce45f36c4d0a6e0180' target=\"_blank\">https://wandb.ai/neuqkyn-rhzz/my%20fint-tune%20on%20deepseek%20r1%20with%20medical%20data/runs/kpp3eiow?apiKey=822b638c1f465585a2a139ce45f36c4d0a6e0180</a><br> View project at: <a href='https://wandb.ai/neuqkyn-rhzz/my%20fint-tune%20on%20deepseek%20r1%20with%20medical%20data?apiKey=822b638c1f465585a2a139ce45f36c4d0a6e0180' target=\"_blank\">https://wandb.ai/neuqkyn-rhzz/my%20fint-tune%20on%20deepseek%20r1%20with%20medical%20data?apiKey=822b638c1f465585a2a139ce45f36c4d0a6e0180</a><br>Synced 5 W&B file(s), 0 media file(s), 0 artifact file(s) and 0 other file(s)"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "Find logs at: <code>./wandb/run-20250217_185020-kpp3eiow/logs</code>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Save the fine-tuned model\n",
    "wandb.finish()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "editable": false,
    "id": "8yEZKVoo6b_z"
   },
   "source": [
    "## Model inference after fine-tuning"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "editable": false,
    "id": "9kVwqsga6b_0",
    "outputId": "32d74201-9815-4093-960c-912550b5ad97",
    "papermill": {
     "duration": 7.941358,
     "end_time": "2024-09-25T13:33:44.195877",
     "exception": false,
     "start_time": "2024-09-25T13:33:36.254519",
     "status": "completed"
    },
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "response0:  <｜begin▁of▁sentence｜>Below is an instruction that describes a task, paired with an input that provides further context.\n",
      "Write a response that appropriately completes the request.\n",
      "Before answering, think carefully about the question and create a step-by-step chain of thoughts to ensure a logical and accurate response.\n",
      "\n",
      "### Instruction:\n",
      "You are a medical expert with advanced knowledge in clinical reasoning, diagnostics, and treatment planning.\n",
      "Please answer the following medical question.\n",
      "\n",
      "### Question:\n",
      "A 61-year-old woman with a long history of involuntary urine loss during activities like coughing or sneezing but no leakage at night undergoes a gynecological exam and Q-tip test. Based on these findings, what would cystometry most likely reveal about her residual volume and detrusor contractions?\n",
      "\n",
      "### Response:\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<｜end▁of▁sentence｜>\n",
      "responsed text:\n",
      "\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<｜end▁of▁sentence｜>\n"
     ]
    }
   ],
   "source": [
    "question = \"A 61-year-old woman with a long history of involuntary urine loss during activities like coughing or sneezing but no leakage at night undergoes a gynecological exam and Q-tip test. Based on these findings, what would cystometry most likely reveal about her residual volume and detrusor contractions?\"\n",
    "\n",
    "\n",
    "FastLanguageModel.for_inference(model)  # Unsloth has 2x faster inference!\n",
    "inputs = tokenizer([prompt_style.format(question, \"\")], return_tensors=\"pt\").to(\"cuda\")\n",
    "\n",
    "outputs = model.generate(\n",
    "    input_ids=inputs.input_ids,\n",
    "    attention_mask=inputs.attention_mask,\n",
    "    max_new_tokens=1200,\n",
    "    use_cache=True,\n",
    ")\n",
    "response = tokenizer.batch_decode(outputs)\n",
    "print(\"response0: \", response[0])\n",
    "print(\"responsed text:\")\n",
    "print(response[0].split(\"### Response:\")[1])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "editable": false,
    "id": "TpM4uf7E6b_0",
    "outputId": "683efd00-33dc-46f6-833d-828c0fd275ea"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "</think>\n",
      "</think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<think>\n",
      "<｜end▁of▁sentence｜>\n"
     ]
    }
   ],
   "source": [
    "question = \"A 59-year-old man presents with a fever, chills, night sweats, and generalized fatigue, and is found to have a 12 mm vegetation on the aortic valve. Blood cultures indicate gram-positive, catalase-negative, gamma-hemolytic cocci in chains that do not grow in a 6.5% NaCl medium. What is the most likely predisposing factor for this patient's condition?\"\n",
    "\n",
    "inputs = tokenizer([prompt_style.format(question, \"\")], return_tensors=\"pt\").to(\"cuda\")\n",
    "\n",
    "outputs = model.generate(\n",
    "    input_ids=inputs.input_ids,\n",
    "    attention_mask=inputs.attention_mask,\n",
    "    max_new_tokens=1200,\n",
    "    use_cache=True,\n",
    ")\n",
    "response = tokenizer.batch_decode(outputs)\n",
    "print(response[0].split(\"### Response:\")[1])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "editable": false,
    "id": "MbpJ1ZaY6b_0"
   },
   "source": [
    "## Saving the model locally"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "模型和分词器已成功保存到 DeepSeek-R1-Medical-COT\n",
      "Unsloth: Merging 4bit and LoRA weights to 16bit...\n",
      "Unsloth: Will use up to 359.99 out of 503.2 RAM for saving.\n",
      "Unsloth: Saving model... This might take 5 minutes ...\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 32/32 [00:00<00:00, 46.36it/s]\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Unsloth: Saving tokenizer... Done.\n",
      "Done.\n",
      "all is ok\n"
     ]
    }
   ],
   "source": [
    "# new_model_online = \"kingabzpro/DeepSeek-R1-Medical-COT\"\n",
    "new_model_local = \"DeepSeek-R1-Medical-COT\"\n",
    "model.save_pretrained(new_model_local) # Local saving\n",
    "tokenizer.save_pretrained(new_model_local)\n",
    "print(f\"模型和分词器已成功保存到 {new_model_local}\")\n",
    "model.save_pretrained_merged(new_model_local, tokenizer, save_method = \"merged_16bit\",)\n",
    "print(\"all is ok\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "editable": false,
    "id": "tju4gSOp6b_0"
   },
   "source": [
    "## Pushing the model to Hugging Face hub"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "editable": false,
    "id": "5I9egNBA6b_0",
    "papermill": {
     "duration": 14.531527,
     "end_time": "2024-09-25T13:34:04.065269",
     "exception": false,
     "start_time": "2024-09-25T13:33:49.533742",
     "status": "completed"
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "model.push_to_hub(new_model_online) # Online saving\n",
    "tokenizer.push_to_hub(new_model_online) # Online saving"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "editable": false,
    "id": "JkY85SIc6b_0"
   },
   "outputs": [],
   "source": [
    "model.save_pretrained_merged(new_model_local, tokenizer, save_method = \"merged_16bit\",)\n",
    "model.push_to_hub_merged(new_model_online, tokenizer, save_method = \"merged_16bit\")"
   ]
  }
 ],
 "metadata": {
  "accelerator": "GPU",
  "colab": {
   "gpuType": "T4",
   "provenance": []
  },
  "kaggle": {
   "accelerator": "nvidiaTeslaT4",
   "dataSources": [],
   "dockerImageVersionId": 30839,
   "isGpuEnabled": true,
   "isInternetEnabled": false,
   "language": "python",
   "sourceType": "notebook"
  },
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.7"
  },
  "papermill": {
   "default_parameters": {},
   "duration": 1500.86091,
   "end_time": "2024-09-25T13:34:07.208125",
   "environment_variables": {},
   "exception": null,
   "input_path": "__notebook__.ipynb",
   "output_path": "__notebook__.ipynb",
   "parameters": {},
   "start_time": "2024-09-25T13:09:06.347215",
   "version": "2.6.0"
  },
  "widgets": {
   "application/vnd.jupyter.widget-state+json": {
    "029a61b64a0844dab51a9eb8ab949bf0": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_4e17d9034b6d41c58bdc8ca94ea0c2fd",
      "placeholder": "​",
      "style": "IPY_MODEL_ac02a01ce16e4fbca4ff1819a5153088",
      "value": " 52.9k/52.9k [00:00&lt;00:00, 4.40MB/s]"
     }
    },
    "045a773300914b91a43f7f4922baf8cc": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "08749a83ae4a47128e23b69dd791ab6e": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "0a389bfe361f43578d55001f88a92fea": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "0f3a15d30fca4e5aa6321f1497e9c449": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "1969437f6b7b4f92bd71058a0bd5755a": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "FloatProgressModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "FloatProgressModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "ProgressView",
      "bar_style": "success",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_e5fd64b00bbb4e299930464604518bac",
      "max": 500,
      "min": 0,
      "orientation": "horizontal",
      "style": "IPY_MODEL_3e6b9d78fce94a20bf09b22b12a58119",
      "value": 500
     }
    },
    "1992bceec6b54ac2827285d39c8c12ee": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "1cd217e8233d495db151f5debdf9f00b": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "FloatProgressModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "FloatProgressModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "ProgressView",
      "bar_style": "success",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_eb8becd866564ffd859e22bbc61a93e8",
      "max": 17209530,
      "min": 0,
      "orientation": "horizontal",
      "style": "IPY_MODEL_7a50ddf657a04aef8c68c4100323fcea",
      "value": 17209530
     }
    },
    "1f2e54775e6e4288a2a772b75d104fbb": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "1fe6b27ff0cc4e9fa39b0b5840a25aec": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_1992bceec6b54ac2827285d39c8c12ee",
      "placeholder": "​",
      "style": "IPY_MODEL_45f8a2d59bfe46008feebab8981d7146",
      "value": "model.safetensors: 100%"
     }
    },
    "2e82c8498b854d41842977ef8f9bbb66": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "30b0da59ccb241439ee988cf52bf81b3": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_1f2e54775e6e4288a2a772b75d104fbb",
      "placeholder": "​",
      "style": "IPY_MODEL_e15cb3d0d72a475ea39eb1ef761dc827",
      "value": "tokenizer.json: 100%"
     }
    },
    "33edc00314bf444188376c01ea025038": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_e68571618bf748ebbf6d3e244e0e7f29",
      "placeholder": "​",
      "style": "IPY_MODEL_e1d763ec083b49d0900cfe5d42d9b214",
      "value": "generation_config.json: 100%"
     }
    },
    "3914a21f18114d6784bbb8f4867be344": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "3e6b9d78fce94a20bf09b22b12a58119": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "ProgressStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "ProgressStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "bar_color": null,
      "description_width": ""
     }
    },
    "41c36bc4fcb542a0bbc3443cd4c742ea": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "424e62fec0c0416ba13f5863391e08f9": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "44d3cf803d244775826d566c4d9ca859": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "45f8a2d59bfe46008feebab8981d7146": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "4afe538bb09d4cf698235e135640ab6e": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HBoxModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HBoxModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HBoxView",
      "box_style": "",
      "children": [
       "IPY_MODEL_1fe6b27ff0cc4e9fa39b0b5840a25aec",
       "IPY_MODEL_f811d4e961914901b3b458934512eb86",
       "IPY_MODEL_9812fb88a8b3411d8675d238161dd7aa"
      ],
      "layout": "IPY_MODEL_6dbb94366cc941a8ba336ba61ebf99ba"
     }
    },
    "4e17d9034b6d41c58bdc8ca94ea0c2fd": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "4e3945399c1642c1bdf724f8a01fcd02": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "FloatProgressModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "FloatProgressModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "ProgressView",
      "bar_style": "success",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_972543b62d0a4d908101b7abc8c1ca15",
      "max": 236,
      "min": 0,
      "orientation": "horizontal",
      "style": "IPY_MODEL_8e5e7c77e88a4d3b8b606f240b627a9d",
      "value": 236
     }
    },
    "4fcaab874f16414391964cd95ebaa648": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "51ad33f2e8dc44f79a8e8fd9a86e22b5": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "5927fd687bc4479eae3bf5985445cc9c": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "6dbb94366cc941a8ba336ba61ebf99ba": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "724109739173448fb1965e01895f51a2": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "76bc4ff5adb746a69954699cf5465c2f": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_045a773300914b91a43f7f4922baf8cc",
      "placeholder": "​",
      "style": "IPY_MODEL_9ef2064efb05485b8b63bb3db815a8ef",
      "value": " 17.2M/17.2M [00:00&lt;00:00, 42.1MB/s]"
     }
    },
    "7a50ddf657a04aef8c68c4100323fcea": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "ProgressStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "ProgressStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "bar_color": null,
      "description_width": ""
     }
    },
    "7ae90e66d3f1459ab5e0c202cf4228ab": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_e5784f34cf184023ac60d15e4c347688",
      "placeholder": "​",
      "style": "IPY_MODEL_3914a21f18114d6784bbb8f4867be344",
      "value": "tokenizer_config.json: 100%"
     }
    },
    "80b57123cbb64b2c9a27c5159a104556": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "82860a16b8d944ff86f854f215535379": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HBoxModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HBoxModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HBoxView",
      "box_style": "",
      "children": [
       "IPY_MODEL_33edc00314bf444188376c01ea025038",
       "IPY_MODEL_4e3945399c1642c1bdf724f8a01fcd02",
       "IPY_MODEL_f58d5860eb854c698f6558e4422acced"
      ],
      "layout": "IPY_MODEL_0f3a15d30fca4e5aa6321f1497e9c449"
     }
    },
    "83c6aa3318cf4c8c8be3fd4f8e9ba387": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_4fcaab874f16414391964cd95ebaa648",
      "placeholder": "​",
      "style": "IPY_MODEL_8c773d3f8c3842a887c37cf14ffcabee",
      "value": " 500/500 [00:02&lt;00:00, 99.67 examples/s]"
     }
    },
    "8c773d3f8c3842a887c37cf14ffcabee": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "8e5e7c77e88a4d3b8b606f240b627a9d": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "ProgressStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "ProgressStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "bar_color": null,
      "description_width": ""
     }
    },
    "972543b62d0a4d908101b7abc8c1ca15": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "9812fb88a8b3411d8675d238161dd7aa": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_424e62fec0c0416ba13f5863391e08f9",
      "placeholder": "​",
      "style": "IPY_MODEL_0a389bfe361f43578d55001f88a92fea",
      "value": " 5.96G/5.96G [01:47&lt;00:00, 93.1MB/s]"
     }
    },
    "9ab8e04684054331928edd757ce8dea3": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "9ef2064efb05485b8b63bb3db815a8ef": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "a60b14d5d28547cea890f3c17ab2ac8a": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "ac02a01ce16e4fbca4ff1819a5153088": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "adb31ccfc7ef415fb47a40ede28fe9db": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "ProgressStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "ProgressStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "bar_color": null,
      "description_width": ""
     }
    },
    "af30810fd0544ba4b904de2ce3f02cec": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_d02a1ccb5a914647a3e9464031d38b79",
      "placeholder": "​",
      "style": "IPY_MODEL_5927fd687bc4479eae3bf5985445cc9c",
      "value": "Map (num_proc=2): 100%"
     }
    },
    "b01764e9ac74437aa174b132789417af": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "FloatProgressModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "FloatProgressModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "ProgressView",
      "bar_style": "success",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_80b57123cbb64b2c9a27c5159a104556",
      "max": 52946,
      "min": 0,
      "orientation": "horizontal",
      "style": "IPY_MODEL_cf8df2dc586a4a9bba21066c50805fda",
      "value": 52946
     }
    },
    "b0dc37d789084b8e95ae90c155699ab7": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_41c36bc4fcb542a0bbc3443cd4c742ea",
      "placeholder": "​",
      "style": "IPY_MODEL_08749a83ae4a47128e23b69dd791ab6e",
      "value": "special_tokens_map.json: 100%"
     }
    },
    "b8428a11dcfe4a2ea6d47b6e010fe3d2": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "ba91815af2f84652987bd01420bb061f": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "bee5e75849cf448fa6c5eb2ef61f48d4": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "cdc489ca63484d4abb3ac39a3f93e33c": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HBoxModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HBoxModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HBoxView",
      "box_style": "",
      "children": [
       "IPY_MODEL_30b0da59ccb241439ee988cf52bf81b3",
       "IPY_MODEL_1cd217e8233d495db151f5debdf9f00b",
       "IPY_MODEL_76bc4ff5adb746a69954699cf5465c2f"
      ],
      "layout": "IPY_MODEL_bee5e75849cf448fa6c5eb2ef61f48d4"
     }
    },
    "cf82cef940944506bbb654363a48cdb7": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "FloatProgressModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "FloatProgressModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "ProgressView",
      "bar_style": "success",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_ba91815af2f84652987bd01420bb061f",
      "max": 483,
      "min": 0,
      "orientation": "horizontal",
      "style": "IPY_MODEL_f500319ad888458f902f5fc4fc30d528",
      "value": 483
     }
    },
    "cf8df2dc586a4a9bba21066c50805fda": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "ProgressStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "ProgressStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "bar_color": null,
      "description_width": ""
     }
    },
    "d02a1ccb5a914647a3e9464031d38b79": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "dca1f2da331542ae85818b544827dd96": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "e07fdea2d68c4284b43df47b7f94fceb": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HBoxModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HBoxModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HBoxView",
      "box_style": "",
      "children": [
       "IPY_MODEL_b0dc37d789084b8e95ae90c155699ab7",
       "IPY_MODEL_cf82cef940944506bbb654363a48cdb7",
       "IPY_MODEL_fe6b626df24943978a0af261d29c7ee4"
      ],
      "layout": "IPY_MODEL_724109739173448fb1965e01895f51a2"
     }
    },
    "e15cb3d0d72a475ea39eb1ef761dc827": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "e1d763ec083b49d0900cfe5d42d9b214": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "e5784f34cf184023ac60d15e4c347688": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "e5fd64b00bbb4e299930464604518bac": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "e68571618bf748ebbf6d3e244e0e7f29": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "eb8becd866564ffd859e22bbc61a93e8": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "f500319ad888458f902f5fc4fc30d528": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "ProgressStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "ProgressStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "bar_color": null,
      "description_width": ""
     }
    },
    "f58d5860eb854c698f6558e4422acced": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_b8428a11dcfe4a2ea6d47b6e010fe3d2",
      "placeholder": "​",
      "style": "IPY_MODEL_dca1f2da331542ae85818b544827dd96",
      "value": " 236/236 [00:00&lt;00:00, 17.9kB/s]"
     }
    },
    "f811d4e961914901b3b458934512eb86": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "FloatProgressModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "FloatProgressModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "ProgressView",
      "bar_style": "danger",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_2e82c8498b854d41842977ef8f9bbb66",
      "max": 5964186418,
      "min": 0,
      "orientation": "horizontal",
      "style": "IPY_MODEL_adb31ccfc7ef415fb47a40ede28fe9db",
      "value": 5964185850
     }
    },
    "fc3993b236b24cbcaecc4e7192fe3254": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HBoxModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HBoxModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HBoxView",
      "box_style": "",
      "children": [
       "IPY_MODEL_af30810fd0544ba4b904de2ce3f02cec",
       "IPY_MODEL_1969437f6b7b4f92bd71058a0bd5755a",
       "IPY_MODEL_83c6aa3318cf4c8c8be3fd4f8e9ba387"
      ],
      "layout": "IPY_MODEL_a60b14d5d28547cea890f3c17ab2ac8a"
     }
    },
    "fe6b626df24943978a0af261d29c7ee4": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_44d3cf803d244775826d566c4d9ca859",
      "placeholder": "​",
      "style": "IPY_MODEL_51ad33f2e8dc44f79a8e8fd9a86e22b5",
      "value": " 483/483 [00:00&lt;00:00, 44.3kB/s]"
     }
    },
    "ff5beb41522f4b80bdb35c436f478bb6": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HBoxModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HBoxModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HBoxView",
      "box_style": "",
      "children": [
       "IPY_MODEL_7ae90e66d3f1459ab5e0c202cf4228ab",
       "IPY_MODEL_b01764e9ac74437aa174b132789417af",
       "IPY_MODEL_029a61b64a0844dab51a9eb8ab949bf0"
      ],
      "layout": "IPY_MODEL_9ab8e04684054331928edd757ce8dea3"
     }
    }
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
